package com.dormitory.management.system.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dormitory.management.system.entity.Building;
import com.dormitory.management.system.req.BuildingPageReq;
import com.dormitory.management.system.req.BuildingSaveReq;
import com.dormitory.management.system.req.BuildingUpdateReq;
import com.dormitory.management.system.resp.BuildingResp;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 楼栋表 服务类
 * </p>
 *
 * @author
 * @since 2021-12-17
 */
public interface BuildingService extends IService<Building> {

    /**
     * 添加楼栋
     * @param req 插入内容
     * @return
     */
    boolean save(BuildingSaveReq req);

    /**
     * 删除楼栋
     * @param id 楼栋id
     * @return
     */
    boolean delete(Long id);

    /**
     * 更新楼栋信息
     * @param req 更新内容
     * @return
     */
    boolean update(BuildingUpdateReq req);

    /**
     * 根据查询条件分页查询
     * @param req 查询条件
     * @return 分页列表
     */
    IPage<BuildingResp> getPage(BuildingPageReq req);
}
